package com.top.ruizhong.main.host

import android.app.Activity
import android.content.Intent
import com.module.lemlin.base.BaseAbstractActivity
import com.top.ruizhong.R
import kotlinx.android.synthetic.main.activity_main_feedback.*
import kotlinx.android.synthetic.main.activity_main_rich_text.*

class MainRichTextActivity : BaseAbstractActivity() {

    companion object {
        private const val EXTRA_KEY_TITLE = "EXTRA_KEY_TITLE"
        fun open(activity: Activity, title: String) {
            val intent = Intent(activity, MainRichTextActivity::class.java)
            intent.putExtra(EXTRA_KEY_TITLE, title)
            activity.startActivity(intent)
        }
    }

    override val layoutResId: Int
        get() = R.layout.activity_main_rich_text

    override fun stateBar(): StatusBar {
        return StatusBar(isLightMode = true, view = flRichTextBar)
    }

    override fun initView() {

        ivRichTextBack.setOnClickListener { this.finish() }

        intent?.getStringExtra(EXTRA_KEY_TITLE)?.let {
            tvRichTextTitle.text = it
        }
    }
}